import request from '@/utils/request'

export function getRole(data) {
  return request({
    url: '/resource/list',
    method: 'get',
    params: data
  })
}
export function addRole(data) {
  return request({
    url: '/role',
    method: 'post',
    data
  })
}
export function addRoleList() {
  return request({
    url: '/role',
    method: 'put'
  })
}
export function editRole(id, data) {
  return request({
    url: '/role/' + id,
    method: 'put',
    data
  })
}
export function newRoleDel(id) {
  return request({
    url: '/role/' + id,
    method: 'delete'
  })
}
export function getRoleList(data) {
  return request({
    url: '/role/list',
    method: 'get',
    params: data
  })
}
